﻿<%@ Page Language="C#" MasterPageFile="~/QuanTri/Manager.master" AutoEventWireup="true"
    CodeFile="QuanLyNamHoc_KyHoc.aspx.cs" Inherits="QuanTri_QuanLyNamHoc_KyHoc" Title="Untitled Page" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head1" runat="Server">
    <link href="../CSS/FixItem.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="Server">
    <div style="width: 100%; height: auto;">
        <div id="main_panel" style="width: 100%;">
            <div id="personal_content" style="padding: 10px; border: 1px solid #ccc">
                <div class="personal_top_text">
                    Quản lý Năm học_Kỳ học
                </div>
                <div>
                    <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" Width="100%">
                        <asp:TabPanel CssClass="TabContainer" HeaderText="Năm học" ID="tbNam" runat="server">
                            <ContentTemplate>
                                <br />
                                <br />
                                <div class="personal_style_form">
                                    <span class="personal_laber">Năm học</span>
                                    <asp:TextBox runat="server" ID="txtNam" Width="250px"></asp:TextBox>
                                    <asp:Label ID="lblMa" runat="server" Visible="False"></asp:Label>
                                </div>
                                <div class="personal_style_form">
                                    <span class="personal_laber">Ngày bắt đầu</span>
                                    <asp:TextBox runat="server" ID="txtNgayBatDau" Width="250px"></asp:TextBox>
                                    <asp:CalendarExtender ID="CalendarExtender1" TargetControlID="txtNgayBatDau" runat="server">
                                    </asp:CalendarExtender>
                                </div>
                                <div class="personal_style_form">
                                    <span class="personal_laber">Ngày kết thúc</span>
                                    <asp:TextBox runat="server" ID="txtNgayKetThuc" Width="250px"></asp:TextBox>
                                    <asp:CalendarExtender ID="CalendarExtender2" TargetControlID="txtNgayKetThuc" runat="server">
                                    </asp:CalendarExtender>
                                </div>
                                <div id="personalSubmit" class="personal_submit clearfix">
                                    <asp:Button ID="btnLuu" Text="Lưu" CssClass="button_150" runat="server" OnClick="btnLuu_Click" />&nbsp;&nbsp;
                                    <asp:Button ID="btnSua" Text="Sửa" CssClass="button_150" runat="server" OnClick="btnSua_Click" />&nbsp;&nbsp;
                                    <asp:Button ID="btnXoa" Text="Xóa" CssClass="button_150" runat="server" Visible="False" />&nbsp;&nbsp;
                                    <asp:Button ID="btnTaoMoi" Text="Tạo Mới" CssClass="button_150" runat="server" OnClick="btnTaoMoi_Click" />&nbsp;&nbsp;
                                </div>
                                <br />
                                <div>
                                    <asp:GridView ID="grvNamHoc" runat="server" AutoGenerateColumns="False" Width="100%"
                                        ForeColor="#333333" AllowPaging="True" Height="28px" ShowFooter="True" OnSelectedIndexChanged="grvNamHoc_SelectedIndexChanged">
                                        <Columns>
                                            <asp:TemplateField HeaderText="STT">
                                                <ItemTemplate>
                                                    <center>
                                                        <%# Container.DataItemIndex + 1 %></center>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Năm học">
                                                <ItemTemplate>
                                                    <center>
                                                        <asp:Label ID="lblMaNam" runat="server" Text='<%#Bind("MaNam") %>' Visible="false"></asp:Label>
                                                        <asp:Label ID="lblNamHoc" runat="server" Text='<%#Bind("TenNam") %>'></asp:Label></center>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Năm học">
                                                <ItemTemplate>
                                                    <center>
                                                        <%#Eval("NgayBatDau") %>
                                                    </center>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Năm học">
                                                <ItemTemplate>
                                                    <center>
                                                        <%#Eval("NgayKetThuc") %>
                                                    </center>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:CommandField EditText="Chọn" HeaderText="Chọn" ShowSelectButton="True" SelectText="Chọn">
                                                <ControlStyle Font-Underline="True" ForeColor="Blue" />
                                            </asp:CommandField>
                                        </Columns>
                                        <HeaderStyle BackColor="#E4ECEF" Font-Bold="True" BorderColor="Blue" Height="30px" />
                                        <PagerStyle BackColor="#E4ECEF" HorizontalAlign="Center" />
                                        <RowStyle BackColor="#EFF3FB" />
                                    </asp:GridView>
                                </div>
                            </ContentTemplate>
                        </asp:TabPanel>
                        <asp:TabPanel HeaderText="Kỳ học" ID="tbKy" runat="server">
                            <ContentTemplate>
                                <br />
                                <br />
                                <div class="personal_style_form">
                                    <span class="personal_laber">Kỳ học</span>
                                    <asp:TextBox runat="server" ID="txtTenKy" Width="250px"></asp:TextBox>
                                    <asp:Label ID="lblKy" runat="server" Visible="False"></asp:Label>
                                </div>
                                <div id="Div1" class="personal_submit clearfix">
                                    <asp:Button ID="btnSave" Text="Lưu" CssClass="button_150" runat="server" OnClick="btnSave_Click" />&nbsp;&nbsp;
                                    <asp:Button ID="btnUpDate" Text="Sửa" CssClass="button_150" runat="server" OnClick="btnUpDate_Click" />&nbsp;&nbsp;
                                    <asp:Button ID="btnDelete" Text="Xóa" CssClass="button_150" runat="server" Visible="False" />&nbsp;&nbsp;
                                    <asp:Button ID="btnNew" Text="Tạo Mới" CssClass="button_150" runat="server" OnClick="btnNew_Click" />&nbsp;&nbsp;
                                </div>
                                <br />
                                <div>
                                    <asp:GridView ID="grvBanHoc" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                        ForeColor="#333333" Height="28px" Width="100%" OnSelectedIndexChanged="grvBanHoc_SelectedIndexChanged">
                                        <Columns>
                                            <asp:TemplateField HeaderText="STT">
                                                <ItemTemplate>
                                                    <center>
                                                        <%# Container.DataItemIndex + 1 %></center>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Kỳ học">
                                                <ItemTemplate>
                                                    <center>
                                                        <asp:Label ID="lblMaKy" runat="server" Text='<%#Bind("MaKy") %>' Visible="false"></asp:Label>
                                                        <asp:Label ID="lblTenKy" runat="server" Text='<%#Bind("TenKy") %>'></asp:Label>
                                                    </center>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:CommandField EditText="Chọn" HeaderText="Chọn" ShowSelectButton="True" SelectText="Chọn">
                                                <ControlStyle Font-Underline="True" ForeColor="Blue" />
                                            </asp:CommandField>
                                        </Columns>
                                        <HeaderStyle BackColor="#E4ECEF" Font-Bold="True" BorderColor="Blue" Height="30px" />
                                        <PagerStyle BackColor="#E4ECEF" HorizontalAlign="Center" />
                                        <RowStyle BackColor="#EFF3FB" />
                                    </asp:GridView>
                                </div>
                            </ContentTemplate>
                        </asp:TabPanel>
                        
                    </asp:TabContainer>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
